import request from '../utils/request';


/**
 * 获取所有维修记录,包括条件查询接口
 * @param query
 * @returns {AxiosPromise}
 */
export const getLogList = query =>{
    return request({
        url:'/common/log/getLogList',
        method:'get',
        params:query
    })
};

/**
 * 获取单个维修记录
 * @param query
 * @returns {AxiosPromise}
 */
export const getLogInfo = query =>{
    return request({
        url:'/common/log/getLogInfo',
        method:'get',
        params:query
    })
};

/**
 * 保存维修记录接口
 * @param data
 * @returns {AxiosPromise}
 */
export const saveLogInfo = data =>{
    return request({
        url:'/common/log/saveLogInfo',
        method:'post',
        data
    })
};
/**
 * 更新维修记录接口
 * @param data
 * @returns {AxiosPromise}
 */
export const updateLogInfo = data =>{
    return request({
        url:'/common/log/updateLogInfo',
        method:'put',
        data
    })
};
/**
 *根据id删除维修记录接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delLogInfo = id =>{
    return request({
        url:'/common/log/delLogInfo',
        method:'delete',
        params:{id:id}
    })
};
/**
 * 根据id集合批量删除维修记录接口
 * @param id
 * @returns {AxiosPromise}
 */
export const delBatchLogInfo = id =>{
    return request({
        url:'/common/log/delBatchLogInfo',
        method:'delete',
        params:{idList:id}
    })
};



